package ibp;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class test {

	public static void main(String[] args) throws Exception {

		System.out.println(new SimpleDateFormat("yyyy-MM-dd hh:mm").format(new Date()));
		System.out.println(new SimpleDateFormat("yyyy-MM-dd hh:m").format(new Date())+":00");
		
		
		//String port = "-18801)" ;
		
		//System.out.println(port.replaceAll("[-|)]", "")/*.replaceFirst("1", "2")*/);
		
		
/*		String logStr = "2017-06-06 15:51:24 | NOTICE | ibas.worker_5 | 304: | [esb][127.0.0.1:-18801] -> [account][127.0.0.1:18101] [ibp_test_echo][测试报文回射服务] [200] | [0.009395] [0.000015][0.003459][0.005673][0.000206] [0.000041]";
		//String logStr = "2017-06-06 15:51:24 | NOTICE | ibas.worker_5 | 304: | [esb][127.0.0.1:-18801] -> [account][127.0.0.1:18101] [ibp_test_echo][测试报文回射服务] [200]";
		logStr = logStr.replaceAll("\\s", "\\]\\[");
		System.out.println(logStr);
		String[] alog = logStr.split("(\\]\\[)");
		if(alog.length>18 && "|".equals(alog[17])){
			for(int i = 0 ;i < alog.length ; i++ ){
				System.out.println("【"+i+"】  ======  "+alog[i].replaceAll("[\\[\\]]", ""));
			}
		}
		*/
		
		
	/*	System.out.println("10".substring(0,1));
		
		System.out.println(new StringBuilder("00").replace(1, 2, "a"));
		*/
		
		//149802656900086400000====================2017-06-22
		long time1 = new SimpleDateFormat("yyyy-MM-dd").parse("2017-06-22").getTime();
		long time2 = new SimpleDateFormat("yyyy-MM-dd").parse("2017-06-21").getTime();
	
		System.out.println(time1+"**********"+time2);
		System.out.println(time1-time2);
		//86400000
		
		System.out.println(25*1000*60*60*24);
		System.out.println((long)25*1000*60*60*24);
		
		
	
		
	}

	
	
	
	
}








